package org.jsbd.boss.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.jsbd.boss.common.DataGridModel;
import org.jsbd.boss.dao.IMiguRegisterStatisticsDAO;
import org.jsbd.boss.domian.HefenVO;
import org.jsbd.boss.domian.statistics.MiguRegisterVO;
import org.springframework.stereotype.Repository;

@Repository("miguRegisterStatisticsDAO")
public class MiguRegisterStatisticsDAOImpl extends CrackStatisticsBaseDao implements IMiguRegisterStatisticsDAO {

	@Override
	public Map<String, Object> findDataWithPage(DataGridModel page, MiguRegisterVO miguRegisterVO) {
		miguRegisterVO = (miguRegisterVO == null ? new MiguRegisterVO() : miguRegisterVO);
		miguRegisterVO.setPageInfo(page);
	    Map<String, Object> results = new HashMap<String, Object>();
	    results.put("total", super.queryForCount("qy_migu_register_statistics.SELECT_COUNT", miguRegisterVO));
	    results.put("rows", super.queryForList("qy_migu_register_statistics.SELECT_LIST", miguRegisterVO));
	    return results;
	}

	@Override
	public Integer selectMiguNumByRd(String rd) {
		return (Integer) super.queryForObject("qy_migu_register_statistics.SELECT_MIGU_NUM_BY_RD", rd);
	}

	@Override
	public Integer selectMiguNumsByRd(String rd) {
		return (Integer) super.queryForObject("qy_migu_register_statistics.SELECT_MIGU_NUMS_BY_RD", rd);
	}

}
